﻿using System;
using System.Collections.Generic;

using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Navigation;
using FinosLibrary.Client;
namespace BattleShipOnline
{
    public partial class MainPage : UserControl
    {
        public static MainPage instance;
        public MainPage()
        {
            InitializeComponent();
            instance = this;
            ChangeContent(new FinosLoader(loader_LoadCompleteEvent));
        }

        void loader_LoadCompleteEvent() {
            Config.Init();
            (App.Current as App).InitializeComponent();
            ChangeContent(new HomePage());
        }

        public static void ChangeContent(UIElement content){
            instance.Content = content;
        }
    }
}
